<div class="deposit block" data-title="存款" ms-controller="deposit">
    <!-- 第一步 填写存款信息 -->
    <div :visible="@step==1">
        <h2 class="h2_title">存款</h2>
        <a href="#" class="depositRecord"><i class="icon"></i> 存款记录</a>
        <ms-tab ms-widget="{list:@tabList.list, switchFn:@tabList.switchFn}"></ms-tab>
        <div class="hint" :visible='@fundProposalNum>0'>
            <i class="icon"></i>
            温韾提示：您目前有 <a href="#/deposit/backlog" class="primaryLink">{{@fundProposalNum}}个存款申请</a> 还未完成！
            <a href="#/deposit/backlog" class="primaryLink">查看详情</a>
        </div>
        <!-- 加载 -->
        <div class="queryLoad" :visible="@queryLoad"></div>

        <!-- 存款表单 -->
        <div class="form" :visible="!@queryLoad">
            <div class="grid_row">
                <div class="row-label">存款账号<span class="danger">*</span>：</div>
                <div class="row-content">
                    <select name="gts2AccountId" id="gts2AccountId" :duplex="@depositPlatform" :change="@changeAccount">
                        <option :for="el in @accTradeInfoList" :attr="{'value':@el.platform}">{{@el.accountNo}}[{{@el.platform}}]</option>
                    </select>
                </div>
            </div>
            <div class="grid_row">
                <div class="row-label">银行账号<span class="danger">*</span>：</div>
                <div class="row-content">
                    <input type="text" class="textInput" readonly :attr="{value:@depositBank.bankAccountName + @depositBank.bankAccountNumber}" >
                    <a href="javascript:;" class="chechBankLauncher" :click="@dialog.display='block'" >
                        选择银行<i class="triangle"></i>
                    </a>
                </div>
            </div>
            <div class="grid_row">
                <div class="row-label">支付方式<span class="danger">*</span>：</div>
                <div class="row-content" :class="{payMethodLoad:@payMethod.load}">
                    <span class="danger" :visible="@payMethod.error.length>0">{{@payMethod.error}}</span>
                    <div class="payway" :if="@payMethod.list.length>0">
                        <label class="col" :for="(i,el) in @payMethod.list">
                            <input type="radio" name="payway" :attr="{value:@el.id}" :duplex-checked="i==0" :change="@selPayMethod=@el" >
                            <i :class="@el.code=='dinpay_wechat' ? 'wxPay':'unionPay'"></i>
                            {{@el.paymentGatewayName}}
                        </label>
                    </div>
                </div>
            </div>
            <div class="grid_row">
                <div class="row-label">存款金额<span class="danger">*</span>：</div>
                <div class="row-content">
                    <input type="text" class="textInput" :duplex="@payMoney">
                    {{@currencyName}}
                </div>
            </div>
            <div class="grid_row">
                <div class="row-label">&nbsp;</div>
                <div class="row-content">
                    <button class="m-btn " 
                    :class="{loading:@depositLoad}"
                    :attr="{disabled:@depositLoad}"
                    :click="@submitfn | prevent">提交</button>
                    <button class="m-btn m-btn-default" ms-click="@resetFn">重设</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 第二步 确认存款信息 -->
    <div :visible="@step==2" class="depositConfirm">
        <h2 class="h2_title">网上存款</h2>
        <div class="article">
            <p class="title">交易限制同意书</p>
            <p class="text">1. 存入资金来自本人提供的存款银行账户，本人为账户持有人及该资金的最终实益拥有人，并确认存入资金与任何非法活动无关。</p>
            <p class="text">2. 该存入资金不是来自第三方。</p>
            <p class="text">3. 同意遵守所有圣文森特和格林纳丁斯适用的防止洗黑钱及反恐融资法例。</p>
            <p class="text">4. 使用微信支付，该微信帐号必须绑定客户在交易平台登记的银行卡，点击查看<a href="../../files/weixin_attentions.pdf" target="_blank" class="primary">详情</a> 。 </p>
            <p class="text">5. 同意若存款金额达到美元10,000(人民币70,000)或以上，必须于14天内以电邮至<a href="mailto:cs@24k.hk" class="primary">cs@24k.hk</a>提供存款证明单据后该资金方会到账。</p>
            <label class="agreeBtnBox">
                <input type="checkbox" :duplex-checked="@agreeClause">
                <span>我同意以上条款</span>
            </label>
        </div>
        <div class="depositInfo mtop20">
            <div class="grid_row">
                <p class="row-label">存款账号：</p>
                <div class="row-content"> 
                    {{@accTradeInfoList[0].accountNo+'['+@depositPlatform+']'}}
                </div>
            </div>
            <div class="grid_row">
                <p class="row-label">存款银行：</p>
                <div class="row-content"> 
                    {{@depositBank.bankAccountName +' '+ @depositBank.bankAccountNumber}}
                    <span class="tipText">（必须与实际支付银行信息匹配）</span>
                </div>
            </div>
            <div class="grid_row">
                <p class="row-label">持卡人姓名：</p>
                <div class="row-content"> 
                    {{@accountInfo.chineseName}}
                    <span class="tipText">（必须本人为账户持有人）</span>
                </div>
            </div>
            <div class="grid_row">
                <p class="row-label">支付方式：</p>
                <div class="row-content"> 
                    <span :class="@selPayMethod.code=='dinpay_wechat' ? 'wxPay':'unionPay'"></span>
                    <span>{{@selPayMethod.paymentGatewayName}}</span>
                </div>
            </div>
            <div class="grid_row">
                <p class="row-label">支付金额：</p>
                <div class="row-content"> 
                    <span class="num">{{@payMoney}}</span> 美元
                </div>
            </div>
            <div class="grid_row">
                <p class="row-label">手续费：</p>
                <div class="row-content"> 
                    <span class="num">{{@fee}}</span> 美元
                </div>
            </div>
            <div class="grid_row">
                <p class="row-label">&nbsp;</p>
                <div class="row-content"> 
                    <button class="m-btn " 
                    :class="{loading:@depositLoad}"
                    :attr="{disabled:@depositLoad}"
                    :click="@confirmSubmit | prevent">确认支付</button>
                    <button class="m-btn m-btn-default" ms-click="@step=1">返回</button>
                </div>
            </div>
        </div>
    </div>

    <div class="tipBlock">
        <p class="label">
            <i class="icon"></i>
            注意事项：
        </p>
        <ul>
            <li>金道贵金属不接受来自第三者的存款。</li>
            <li>金道贵金属接受使用借记卡进行存款，不接受信用卡支付。</li>
            <li>请于开户后十四天内提交身份证明文件和取款银行卡资料，以确保阁下所属之交易账户的资金受到合法、安全的监管。</li>
            <li>本人确认为账户持有人及为该资金的最终实益拥有人，并确认存入资金与任何非法活动无关。</li>
            <li>本人承诺在此用于存款的银行卡属于本人合法持有，所有存款均由本人操作。</li>
            <li>本人同意使用该银行卡在金道贵金属有限公司进行存款。</li>
            <li>使用微信支付，该微信账号必须绑定客户在交易平台登记的银行卡，点此<a href="#" class="primaryLink">查看详情</a>。</li>
        </ul>
    </div>

    <!-- 选择银行的弹窗  start -->
    <xmp is="ms-dialog" ms-widget="{dialog:@dialog}" >
        <div class="label"> 常用银行 </div>
        <ul class="checkBankList" >
            <li :for="el in @bankInfoList">
                <label :class="{disabled: @el.versionNo==999}">
                    <input type="radio" name="checkbank" :attr="{value:@el.bank}" :focus="@dialog.checkBank = @el" />
                    <span>{{@el.bankAccountName+' '+@el.bankAccountNumber}}</span>
                </label>
                <span class="disabledTip" :if="@el.versionNo==999"><i>x</i>不支持此银行</span>
            </li>
        </ul>
        <div class="label"> 其他银行 </div>
        <ul class="checkBankList other" >
            <li :for="el in @duplicateList">
                <label>
                    <input type="radio" name="checkbank" :attr="{value:@el.bank}" :focus="@dialog.checkBank = @el" />
                    <span class="bankIcon " :class="@el.bank" :attr="{title:@el.bankAccountName}"></span>
                </label>
            </li>
        </ul>
        <div class="bankAccount" :visible="!@dialog.checkBank.bankAccountNumber">
            <label >银行账号<span class="showy">*</span>：</label>
            <input type="text" class="textInput" :duplex="@dialog.inputAccountNumber" :on-input="@formatBankAccount" />
        </div>
        <div class="btnBox">
            <button class="m-btn" :click="@dialog.solve">确定银行支付账号</button>
        </div>
    </xmp>
    <!-- 选择银行的弹窗  start -->

    <!-- 确认支付成功或者失败的弹窗  start -->
    <xmp is="ms-dialog" ms-widget="{dialog:@confirmDialog}" >
        <p>
            <span class="paySuccessIcon"></span>
            <span class="paysuccessText">您的订单已经被提交到支付平台，请在银行页面完成支付，支付成功即可完成存款。</span> 
        </p>
        <div class="btnBox">
            <button class="m-btn">支付成功</button>
            <button class="m-btn-default mleft10">支付失败</button>
        </div>
    </xmp>
    <!-- 确认支付成功或者失败的弹窗  start -->
</div>